//index.js
//获取应用实例
var app = getApp()
Page({
    data:{motto:'Hello World',userInfo:{}},

    //事件处理
    bindViewTap: function(){
        wx.navigateTo({
            url: '../logs/logs'    
        })    
    },

    bindViewDemo:function(){
        wx.navigateTo({
          url: '../demo/demo'
        })
    },

    tapName:function(event){
        console.log(event)
    },

    onLoad:function(){
        console.log('onLoad')
        var that = this
        app.getUserInfo(function(userInfo){
        //更新数据
            that.setData({
                userInfo:userInfo
            })
        })
    }
})
